package ru.rchervot.sanasar.client.model;

import java.util.Date;

public class SearchResultsItemOrders extends AbstractSearchResultsItem {

    private Date startDate;
    private Date endDate;
    private String comments;
    private Integer discount;
    private String regionOther;
    private boolean onhold;
    private Date created;
    private Date updated;
    private boolean deleted;
    private String fee;
    private Integer deleter;
    private Integer quantity;
    private Integer regionId;
    private Integer positionId;
    private Integer creatorId;
    private Integer updaterId;

    
    /** Creates a new instance of OrderObject */
    public SearchResultsItemOrders() {
    }


    /**
     * Gets the startDate of this OrderObject.
     * 
     */
    public Date getStartDate() {
        return this.startDate;
    }

    /**
     * Sets the startDate of this OrderObject to the specified value.
     * 
     */
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    /**
     * Gets the endDate of this OrderObject.
     * 
     */
    public Date getEndDate() {
        return this.endDate;
    }

    /**
     * Sets the endDate of this OrderObject to the specified value.
     * 
     */
    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    /**
     * Gets the comments of this OrderObject.
     * 
     */
    public String getComments() {
        return this.comments;
    }

    /**
     * Sets the comments of this OrderObject to the specified value.
     * 
     */
    public void setComments(String comments) {
        this.comments = comments;
    }

    /**
     * Gets the discount of this OrderObject.
     * 
     */
    public Integer getDiscount() {
        return this.discount;
    }

    /**
     * Sets the discount of this OrderObject to the specified value.
     * 
     */
    public void setDiscount(Integer discount) {
        this.discount = discount;
    }

    /**
     * Gets the regionOther of this OrderObject.
     * 
     */
    public String getRegionOther() {
        return this.regionOther;
    }

    /**
     * Sets the regionOther of this OrderObject to the specified value.
     * 
     */
    public void setRegionOther(String regionOther) {
        this.regionOther = regionOther;
    }

    /**
     * Gets the onhold of this OrderObject.
     * 
     */
    public boolean getOnhold() {
        return this.onhold;
    }

    /**
     * Sets the onhold of this OrderObject to the specified value.
     * 
     */
    public void setOnhold(boolean onhold) {
        this.onhold = onhold;
    }

    /**
     * Gets the created of this OrderObject.
     * 
     */
    public Date getCreated() {
        return this.created;
    }

    /**
     * Sets the created of this OrderObject to the specified value.
     * 
     */
    public void setCreated(Date created) {
        this.created = created;
    }

    /**
     * Gets the updated of this OrderObject.
     * 
     */
    public Date getUpdated() {
        return this.updated;
    }

    /**
     * Sets the updated of this OrderObject to the specified value.
     * 
     */
    public void setUpdated(Date updated) {
        this.updated = updated;
    }

    /**
     * Gets the deleted of this OrderObject.
     * 
     */
    public boolean getDeleted() {
        return this.deleted;
    }

    /**
     * Sets the deleted of this OrderObject to the specified value.
     * 
     */
    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    /**
     * Gets the fee of this OrderObject.
     * 
     */
    public String getFee() {
        return this.fee;
    }

    /**
     * Sets the fee of this OrderObject to the specified value.
     * 
     */
    public void setFee(String fee) {
        this.fee = fee;
    }

    /**
     * Gets the deleter of this OrderObject.
     * 
     */
    public Integer getDeleter() {
        return this.deleter;
    }

    /**
     * Sets the deleter of this OrderObject to the specified value.
     * 
     */
    public void setDeleter(Integer deleter) {
        this.deleter = deleter;
    }

    /**
     * Gets the quantity of this OrderObject.
     * 
     */
    public Integer getQuantity() {
        return this.quantity;
    }

    /**
     * Sets the quantity of this OrderObject to the specified value.
     * 
     */
    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    /**
     * Gets the regionId of this OrderObject.
     * 
     */
    public Integer getRegionId() {
        return this.regionId;
    }

    /**
     * Sets the regionId of this OrderObject to the specified value.
     * 
     */
    public void setRegionId(Integer regionId) {
        this.regionId = regionId;
    }

    /**
     * Gets the creatorId of this OrderObject.
     * 
     */
    public Integer getCreatorId() {
        return this.creatorId;
    }

    /**
     * Sets the creatorId of this OrderObject to the specified value.
     * 
     */
    public void setCreatorId(Integer creatorId) {
        this.creatorId = creatorId;
    }

    /**
     * Gets the updaterId of this OrderObject.
     * 
     */
    public Integer getUpdaterId() {
        return this.updaterId;
    }

    /**
     * Sets the updaterId of this OrderObject to the specified value.
     * 
     */
    public void setUpdaterId(Integer updaterId) {
        this.updaterId = updaterId;
    }


    /**
     * Returns a string representation of the object.  This implementation constructs 
     * that representation based on the itemID fields.
     * 
     * 
     */
    
    public String toString() {
        return "SearchResultsItemOrder[itemID=" + getItemID() + "]";
    }
    
    
    private String categoryName;

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }
    
    
    private String regionName;

    public String getRegionName() {
        return regionName;
    }

    public void setRegionName(String regionName) {
        this.regionName = regionName;
    }

    public Integer getPositionId() {
        return positionId;
    }

    public void setPositionId(Integer positionId) {
        this.positionId = positionId;
    }
    
    
    private String statistics;

    public String getStatistics() {
        return statistics;
    }

    public void setStatistics(String statistics) {
        this.statistics = statistics;
    }
    
    
    private String companyName;

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }
    
    
    private String employees;

    public String getEmployees() {
        return employees;
    }

    public void setEmployees(String employees) {
        this.employees = employees;
    }
    
    
    private String contactPersons;

    public String getContactPersons() {
        return contactPersons;
    }

    public void setContactPersons(String contactPersons) {
        this.contactPersons = contactPersons;
    }
    
    
    private String city;

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }
    
        
    /**
     * Holds value of property salaryLow.
     */
    
    private Integer salaryLow;
    
    /**
     * Getter for property salaryLow.
     * 
     */
    public Integer getSalaryLow() {
        
        return this.salaryLow;
    }
    
    /**
     * Setter for property salaryLow.
     * 
     */
    public void setSalaryLow(Integer salaryLow) {
        
        this.salaryLow = salaryLow;
    }
    
    /**
     * Holds value of property salaryHigh.
     */
    
    private Integer salaryHigh;
    
    /**
     * Getter for property salaryHigh.
     * 
     */
    public Integer getSalaryHigh() {
        
        return this.salaryHigh;
    }
    
    /**
     * Setter for property salaryHigh.
     * 
     */
    public void setSalaryHigh(Integer salaryHigh) {
        
        this.salaryHigh = salaryHigh;
    }
    
    
    private String currency;

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }
    
    public String getSalaryRange() {
        if (currency == null) return null;
        
        String s = "";
        
        if (salaryLow != null 
                && salaryLow.intValue() != 0) {
            s += salaryLow.toString();
           
            if (currency.equalsIgnoreCase("USD")) {
                s = "$" + salaryLow.toString();
            } else if (currency.equalsIgnoreCase("RUR")) {
                s = salaryLow.toString() + " руб";
            }
           
        }
        
        if (salaryHigh != null 
                && salaryHigh.intValue() != 0) {
            if (s.length() > 0) {
                s += "-";
            }
            
            if (currency.equalsIgnoreCase("USD")) {
                s += "$" + salaryHigh.toString();
            } else if (currency.equalsIgnoreCase("RUR")) {
                s += salaryHigh.toString() + " руб";
            }
            
        }
        
        return s;
    }

    public String getTitleWithSalary() {
        return title + " " + getSalaryRange();
    }
    
    
    private String title;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
    
    
    private Integer viewR3;

    public Integer getViewR3() {
        return viewR3;
    }

    public void setViewR3(Integer viewR3) {
        this.viewR3 = viewR3;
    }
    
    
    private Integer viewCand;
    
    
    private Integer viewT1;
    
    
    private Integer viewT2;
    
    
    private Integer viewT3;
    
    
    private Integer viewT4;
    
    
    private Integer viewR10;
    
    
    private Integer viewR20;
    
    
    private Integer viewR30;
    
    
    private Integer viewR40;
    
    
    private Integer viewPlc;

    public Integer getViewCand() {
        return viewCand;
    }

    public void setViewCand(Integer viewCand) {
        this.viewCand = viewCand;
    }

    public Integer getViewT1() {
        return viewT1;
    }

    public void setViewT1(Integer viewT1) {
        this.viewT1 = viewT1;
    }

    public Integer getViewT2() {
        return viewT2;
    }

    public void setViewT2(Integer viewT2) {
        this.viewT2 = viewT2;
    }

    public Integer getViewT3() {
        return viewT3;
    }

    public void setViewT3(Integer viewT3) {
        this.viewT3 = viewT3;
    }

    public Integer getViewT4() {
        return viewT4;
    }

    public void setViewT4(Integer viewT4) {
        this.viewT4 = viewT4;
    }

    public Integer getViewR10() {
        return viewR10;
    }

    public void setViewR10(Integer viewR10) {
        this.viewR10 = viewR10;
    }

    public Integer getViewR20() {
        return viewR20;
    }

    public void setViewR20(Integer viewR20) {
        this.viewR20 = viewR20;
    }

    public Integer getViewR30() {
        return viewR30;
    }

    public void setViewR30(Integer viewR30) {
        this.viewR30 = viewR30;
    }

    public Integer getViewR40() {
        return viewR40;
    }

    public void setViewR40(Integer viewR40) {
        this.viewR40 = viewR40;
    }

    public Integer getViewPlc() {
        return viewPlc;
    }

    public void setViewPlc(Integer viewPlc) {
        this.viewPlc = viewPlc;
    }
    
    
    private Integer viewR2;

    public Integer getViewR2() {
        return viewR2;
    }

    public void setViewR2(Integer viewR2) {
        this.viewR2 = viewR2;
    }
}
